<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"
      xmlns:fb="https://www.facebook.com/2008/fbml"> 
  <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# video: http://ogp.me/ns/video#">
  <title>OG Tutorial App</title>
  <meta property="fb:app_id"      content="269560773171053" /> 
  <meta property="og:type"        content="video.movie" /> 
  <meta property="og:url"         content="http://www.rottentomatoes.com/m/the_hobbit_an_unexpected_journey/" /> 
  <meta property="og:title"       content="The hobbit" /> 
  <meta property="og:image"       content="http://content9.flixster.com/movie/11/16/28/11162899_det.jpg" /> 
  <meta property="video:actor:id" content="Bilbo" /> 

  <script type="text/javascript">
  function postMovie()
  {
      FB.api(
        //'/me/aonzopengraph:watch'
        '/me/video.watches?'
        //+ '?movie=http://www.rottentomatoes.com/m/the_hobbit_an_unexpected_journey/'
        ,
        'post',
        { movie: 'http://www.rottentomatoes.com/m/the_hobbit_an_unexpected_journey/' },
        function(response) {
           if (!response || response.error) {
              alert( response.error.message );
           } else {
              alert('Cook was successful! Action ID: ' + response.id);
           }
        });
  }
  
  function postCook()
  {
      FB.api(
        //'/me/aonzopengraph:watch'
        '/me/aonzopengraph:cook?'
        //+ '?movie=http://www.rottentomatoes.com/m/the_hobbit_an_unexpected_journey/'
        ,
        'post',
        { recipe: 'Aonz Recipe', object:'http://www.rottentomatoes.com/m/the_hobbit_an_unexpected_journey/' },
        function(response) {
           if (!response || response.error) {
              alert( response.error.message );
           } else {
              alert('Cook was successful! Action ID: ' + response.id);
           }
        });
  }
  
  </script>
</head>
<body>
  <div id="fb-root"></div>
  <script>
    window.fbAsyncInit = function() {
      FB.init({
        appId      : '269560773171053', // App ID
        status     : true, // check login status
        cookie     : true, // enable cookies to allow the server to access the session
        xfbml      : true  // parse XFBML
      });
    };

    // Load the SDK Asynchronously
    (function(d){
      var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
      js = d.createElement('script'); js.id = id; js.async = true;
      js.src = "//connect.facebook.net/en_US/all.js";
      d.getElementsByTagName('head')[0].appendChild(js);
    }(document));
  </script>

<fb:login-button show-faces="true" width="200" max-rows="1" scope="publish_actions">
  </fb:login-button>
  
  <h3>Stuffed Cookies</h3>
  <p>
    <img title="Hobbit" 
         src="http://content9.flixster.com/movie/11/16/28/11162899_det.jpg" 
         width="550"/>
  </p>

  <br>
  <form>
    <input type="button" value="Cook" onclick="postMovie()" />
  </form>
</body>
</html>